﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="QLNhaCC.aspx.cs" Inherits="Web.Shalo.BanPMS1.Admin.QLNhaCC" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentAdmin" runat="server">
<div id="page-heading">
		<h1>Quản Lý Nhà Cung Cấp</h1>
	</div>
	<!-- end page-heading -->

	<table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
	<tr>
		<th rowspan="3" class="sized"><img src="images/shared/side_shadowleft.jpg" width="20" height="300" alt="" /></th>
		<th class="topleft"></th>
		<td id="tbl-border-top">&nbsp;</td>
		<th class="topright"></th>
		<th rowspan="3" class="sized"><img src="images/shared/side_shadowright.jpg" width="20" height="300" alt="" /></th>
	</tr>
	<tr>
		<td id="tbl-border-left"></td>
		<td>
		<!--  start content-table-inner ...................................................................... START -->
		<div id="content-table-inner">
		
			<!--  start table-content  -->
			<div id="table-content">
				
			
			    <asp:MultiView ID="MultiView1" runat="server">
                    <asp:View ID="View1" runat="server">
                        <table style="width: 100%">
                            <tr>
                                <td>
                                    <h2>Danh Sách Nhà Cung Cấp</h2></td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:GridView ID="GVNhacc" runat="server" AutoGenerateColumns="False" 
                                        CssClass="mGrid" Width="691px" AllowPaging="True" 
                                        onpageindexchanging="GVNhacc_PageIndexChanging" 
                                        onrowdeleting="GVNhacc_RowDeleting" 
                                        onselectedindexchanging="GVNhacc_SelectedIndexChanging">
                                        <Columns>
                                            <asp:BoundField DataField="MaNCC" HeaderText="Mã NCC" />
                                            <asp:BoundField DataField="TenNCC" HeaderText="Tên NCC" />
                                            <asp:BoundField DataField="DiaChi" HeaderText="Địa Chỉ" />
                                            <asp:BoundField DataField="Email" HeaderText="Email" />
                                            <asp:BoundField DataField="SDT" HeaderText="Số DT" />
                                            <asp:ButtonField CommandName="Select" Text="Sửa" ControlStyle-CssClass="link" >
                                            <ControlStyle CssClass="link" />
                                            <ItemStyle HorizontalAlign="Center" />
                                            </asp:ButtonField>
                                            <asp:ButtonField CommandName="Delete" Text="Xóa" ControlStyle-CssClass="link" >
                                            <ControlStyle CssClass="link" />
                                            <ItemStyle HorizontalAlign="Center" />
                                            </asp:ButtonField>
                                        </Columns>
                                    </asp:GridView>
                                </td>
                            </tr>
                            <tr>
                                <td style="height: 39px">
                                    <asp:Button ID="btnTaomoi" runat="server" Text="Tạo Mới Nhà Cung Cấp" 
                                        CssClass="btn" onclick="btnTaomoi_Click" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    &nbsp;</td>
                            </tr>
                        </table>
                    </asp:View>
                    <br />
                    <asp:View ID="View2" runat="server">
                        <table style="width: 100%">
                            <tr>
                                <td colspan="2">
                                    <h2>Cập Nhật Nhà Cung Cấp</h2></td>
                            </tr>
                            <tr>
                                <td style="width: 112px">
                                    Tên nhà cung cấp:</td>
                                <td>
                                    <asp:TextBox ID="txtTenncc" runat="server" Height="30px" Width="340px"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                        ControlToValidate="txtTenncc" Display="Dynamic" ErrorMessage="(*)" 
                                        ForeColor="Red"></asp:RequiredFieldValidator>
                                    <asp:Label ID="labMaNCC" runat="server" Text="Label" Visible="False"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 112px">
                                    &nbsp;</td>
                                <td>
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td style="width: 112px">
                                    Địa chỉ:</td>
                                <td>
                                    <asp:TextBox ID="txtDiachi" runat="server" Height="30px" Width="340px"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                                        ControlToValidate="txtDiachi" Display="Dynamic" ErrorMessage="(*)" 
                                        ForeColor="Red"></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 112px">
                                    &nbsp;</td>
                                <td>
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td style="width: 112px">
                                    Email:</td>
                                <td>
                                    <asp:TextBox ID="txtEmail" runat="server" Height="30px" Width="340px"></asp:TextBox>
                                    <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                                        ControlToValidate="txtEmail" Display="Dynamic" 
                                        ErrorMessage="Nhập Địa Chỉ Email" ForeColor="Red" 
                                        ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 112px; height: 16px;">
                                    </td>
                                <td style="height: 16px">
                                    </td>
                            </tr>
                            <tr>
                                <td style="width: 112px">
                                    Số điện thoại:</td>
                                <td>
                                    <asp:TextBox ID="txtSdt" runat="server" Height="30px" Width="340px"  ></asp:TextBox>
                                    <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" 
                                        ControlToValidate="txtSdt" Display="Dynamic" ErrorMessage="Nhập SDT Đúng 12 Số" 
                                        ForeColor="Red" ValidationExpression="^[0-9]{11}"></asp:RegularExpressionValidator>
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 112px">
                                    &nbsp;</td>
                                <td>
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td style="width: 112px">
                                    &nbsp;</td>
                                <td>
                                    <asp:Button ID="btnThemNCC" runat="server" Text="Tạo Mới" CssClass="btn" 
                                        onclick="btnThemNCC_Click" />
                                    <asp:Button ID="btnSuaNCC" runat="server" CssClass="btn" Text="Sửa" 
                                        onclick="btnSuaNCC_Click" />
                                    <asp:Button ID="bthHuy" runat="server" CssClass="btn" Text="Hủy" 
                                        CausesValidation="False" onclick="bthHuy_Click" />
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 112px">
                                    &nbsp;</td>
                                <td>
                                    &nbsp;</td>
                            </tr>
                        </table>
                    </asp:View>
                </asp:MultiView>
				
			
			</div>
			<!--  end table-content  -->
	
			<div class="clear"></div>
		 
		</div>
		<!--  end content-table-inner ............................................END  -->
		</td>
		<td id="tbl-border-right"></td>
	</tr>
	<tr>
		<th class="sized bottomleft"></th>
		<td id="tbl-border-bottom">&nbsp;</td>
		<th class="sized bottomright"></th>
	</tr>
	</table>
	<div class="clear">&nbsp;</div>


</asp:Content>
